# encoding: utf-8
require File.expand_path('CreatTemplate', File.dirname(__FILE__))
require File.expand_path('DbConnector', File.dirname(__FILE__))
class Controller
  def initialize(params,session,others)
    @params=params
    @session=session
    # @path=File.expand_path('../', File.dirname(__FILE__))
    @others=others
    @view=CreatTemplate.new
    DbConnector.new
    # @view=ct.clone
  end

  protected
  def getId
    return @params[:id]
  end

  def info
    # puts self.methods
    self.public_methods.to_s.split("blank?")[0]
  end

  def gggg
    "gggg function"
  end

  def getView
    return @view
  end

  def outjsonp(s)
    @params[:callback]+"(["+s+"])"
  end

end